package com.hhtc.jsj.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 帖子表
 * </p>
 *
 * @author ty
 * @since 2022-04-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("post")
@ApiModel(value="Post对象", description="帖子表")
public class Post extends Model<Post> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "发帖人id")
    @TableField("post_user_id")
    private Long postUserId;

    @ApiModelProperty(value = "发帖人姓名")
    @TableField("post_user_name")
    private String postUserName;

    @ApiModelProperty(value = "帖子内容")
    @TableField("post_content")
    private String postContent;

    @ApiModelProperty(value = "贴子图片")
    @TableField("post_images")
    private String postImages;

    @ApiModelProperty(value = "评论数")
    @TableField("content_counts")
    private Integer contentCounts;

    @ApiModelProperty(value = "点赞数")
    @TableField("like_counts")
    private Integer likeCounts;

    @ApiModelProperty(value = "是否管理员下架")
    @TableField("is_take_down")
    private Integer isTakeDown;

    @ApiModelProperty(value = "创建时间")
    @TableField("created_time")
    private Long createdTime;

    @ApiModelProperty(value = "创建人")
    @TableField("created_by")
    private String createdBy;

    @ApiModelProperty(value = "修改时间")
    @TableField("updated_time")
    private Long updatedTime;

    @ApiModelProperty(value = "修改人")
    @TableField("updated_by")
    private String updatedBy;

    @ApiModelProperty(value = "删除状态（ 1 正常  2删除）")
    @TableField("is_deleted")
    private Integer isDeleted;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
